package a22_factorymethod;

public abstract class AbstractFactory {

	public AbstractProduct createInstance() {
		AbstractProduct instance = create();
		doSomeThing(instance);
		return create();
	}

	protected abstract AbstractProduct create();

	protected abstract void doSomeThing(AbstractProduct instance);
}
